home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13815 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C source text default
98% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 68 75 | 72 73 6c 65 79 2e 69 62 |Path: hu|rsley.ib|
|00000010| 6d 2e 63 6f 6d 21 6e 65 | 77 73 0a 46 72 6f 6d 3a |m.com!ne|ws.From:|
|00000020| 20 4d 61 78 20 57 61 74 | 65 72 6d 61 6e 20 3c 64 | Max Wat|erman <d|
|00000030| 77 61 74 65 72 40 77 69 | 67 68 74 2e 68 75 72 73 |water@wi|ght.hurs|
|00000040| 6c 65 79 2e 69 62 6d 2e | 63 6f 6d 3e 0a 4e 65 77 |ley.ibm.|com>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |ng.c.Sub|ject: Re|
|00000070| 3a 20 46 6f 72 6d 61 74 | 74 65 64 20 70 72 69 6e |: Format|ted prin|
|00000080| 74 20 77 69 74 68 20 76 | 61 72 69 61 62 6c 65 20 |t with v|ariable |
|00000090| 6f 75 74 70 75 74 20 66 | 69 65 6c 64 20 77 69 64 |output f|ield wid|
|000000a0| 74 68 2e 0a 44 61 74 65 | 3a 20 57 65 64 2c 20 31 |th..Date|: Wed, 1|
|000000b0| 30 20 41 70 72 20 31 39 | 39 36 20 31 33 3a 30 34 |0 Apr 19|96 13:04|
|000000c0| 3a 35 38 20 2b 30 31 30 | 30 0a 4f 72 67 61 6e 69 |:58 +010|0.Organi|
|000000d0| 7a 61 74 69 6f 6e 3a 20 | 49 42 4d 20 55 4b 20 4c |zation: |IBM UK L|
|000000e0| 61 62 6f 72 61 74 6f 72 | 69 65 73 20 4c 74 64 2e |aborator|ies Ltd.|
|000000f0| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 33 31 |.Message|-ID: <31|
|00000100| 36 42 41 33 45 41 2e 32 | 33 37 43 40 77 69 67 68 |6BA3EA.2|37C@wigh|
|00000110| 74 2e 68 75 72 73 6c 65 | 79 2e 69 62 6d 2e 63 6f |t.hursle|y.ibm.co|
|00000120| 6d 3e 0a 52 65 66 65 72 | 65 6e 63 65 73 3a 20 3c |m>.Refer|ences: <|
|00000130| 62 65 72 6c 69 6e 65 72 | 44 70 4d 42 6f 45 2e 41 |berliner|DpMBoE.A|
|00000140| 45 6e 40 6e 65 74 63 6f | 6d 2e 63 6f 6d 3e 0a 52 |En@netco|m.com>.R|
|00000150| 65 70 6c 79 2d 54 6f 3a | 20 6d 61 78 2d 6c 74 6f |eply-To:| max-lto|
|00000160| 6e 40 74 63 70 2e 63 6f | 2e 75 6b 0a 4e 4e 54 50 |n@tcp.co|.uk.NNTP|
|00000170| 2d 50 6f 73 74 69 6e 67 | 2d 48 6f 73 74 3a 20 77 |-Posting|-Host: w|
|00000180| 69 67 68 74 2e 68 75 72 | 73 6c 65 79 2e 69 62 6d |ight.hur|sley.ibm|
|00000190| 2e 63 6f 6d 0a 4d 69 6d | 65 2d 56 65 72 73 69 6f |.com.Mim|e-Versio|
|000001a0| 6e 3a 20 31 2e 30 0a 43 | 6f 6e 74 65 6e 74 2d 54 |n: 1.0.C|ontent-T|
|000001b0| 79 70 65 3a 20 74 65 78 | 74 2f 70 6c 61 69 6e 3b |ype: tex|t/plain;|
|000001c0| 20 63 68 61 72 73 65 74 | 3d 75 73 2d 61 73 63 69 | charset|=us-asci|
|000001d0| 69 0a 43 6f 6e 74 65 6e | 74 2d 54 72 61 6e 73 66 |i.Conten|t-Transf|
|000001e0| 65 72 2d 45 6e 63 6f 64 | 69 6e 67 3a 20 37 62 69 |er-Encod|ing: 7bi|
|000001f0| 74 0a 58 2d 4d 61 69 6c | 65 72 3a 20 4d 6f 7a 69 |t.X-Mail|er: Mozi|
|00000200| 6c 6c 61 20 32 2e 30 31 | 20 28 58 31 31 3b 20 49 |lla 2.01| (X11; I|
|00000210| 3b 20 41 49 58 20 32 29 | 0a 54 6f 3a 20 47 75 79 |; AIX 2)|.To: Guy|
|00000220| 20 42 65 72 6c 69 6e 65 | 72 20 3c 62 65 72 6c 69 | Berline|r <berli|
|00000230| 6e 65 72 40 6e 65 74 63 | 6f 6d 2e 63 6f 6d 3e 0a |ner@netc|om.com>.|
|00000240| 0a 59 65 73 2c 20 79 6f | 75 20 63 61 6e 20 64 6f |.Yes, yo|u can do|
|00000250| 20 74 68 69 73 20 77 69 | 74 68 20 70 72 69 6e 74 | this wi|th print|
|00000260| 66 28 29 2e 20 45 67 20 | 3a 0a 0a 23 69 6e 63 6c |f(). Eg |:..#incl|
|00000270| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0a 0a 69 |ude <std|io.h>..i|
|00000280| 6e 74 20 6d 61 69 6e 28 | 20 76 6f 69 64 20 29 0a |nt main(| void ).|
|00000290| 7b 0a 20 20 69 6e 74 20 | 66 69 65 6c 64 5f 77 69 |{. int |field_wi|
|000002a0| 64 74 68 3b 0a 20 20 69 | 6e 74 20 70 72 65 63 69 |dth;. i|nt preci|
|000002b0| 73 69 6f 6e 3b 0a 20 20 | 63 6f 6e 73 74 20 64 6f |sion;. |const do|
|000002c0| 75 62 6c 65 20 61 6e 79 | 5f 6e 75 6d 62 65 72 20 |uble any|_number |
|000002d0| 3d 20 31 32 33 34 35 36 | 37 2e 31 34 31 35 39 32 |= 123456|7.141592|
|000002e0| 36 35 33 35 3b 0a 0a 20 | 20 66 6f 72 28 20 66 69 |6535;.. | for( fi|
|000002f0| 65 6c 64 5f 77 69 64 74 | 68 3d 30 3b 20 66 69 65 |eld_widt|h=0; fie|
|00000300| 6c 64 5f 77 69 64 74 68 | 3c 31 30 3b 20 66 69 65 |ld_width|<10; fie|
|00000310| 6c 64 5f 77 69 64 74 68 | 2b 2b 20 29 0a 20 20 20 |ld_width|++ ). |
|00000320| 20 66 6f 72 28 20 70 72 | 65 63 69 73 69 6f 6e 3d | for( pr|ecision=|
|00000330| 30 3b 20 70 72 65 63 69 | 73 69 6f 6e 3c 32 30 3b |0; preci|sion<20;|
|00000340| 20 70 72 65 63 69 73 69 | 6f 6e 2b 2b 20 29 0a 20 | precisi|on++ ). |
|00000350| 20 20 20 20 20 70 72 69 | 6e 74 66 28 20 22 25 2a | pri|ntf( "%*|
|00000360| 2e 2a 66 3c 6e 22 2c 20 | 66 69 65 6c 64 5f 77 69 |.*f<n", |field_wi|
|00000370| 64 74 68 2c 20 70 72 65 | 63 69 73 69 6f 6e 2c 20 |dth, pre|cision, |
|00000380| 61 6e 79 5f 6e 75 6d 62 | 65 72 20 29 3b 0a 0a 20 |any_numb|er );.. |
|00000390| 20 72 65 74 75 72 6e 20 | 30 3b 0a 7d 0a 47 75 79 | return |0;.}.Guy|
|000003a0| 20 42 65 72 6c 69 6e 65 | 72 20 77 72 6f 74 65 3a | Berline|r wrote:|
|000003b0| 0a 3e 20 0a 3e 20 44 6f | 65 73 20 61 6e 79 6f 6e |.> .> Do|es anyon|
|000003c0| 65 20 6b 6e 6f 77 20 6f | 66 20 61 20 77 61 79 20 |e know o|f a way |
|000003d0| 6f 66 20 63 72 65 61 74 | 69 6e 67 20 61 20 76 61 |of creat|ing a va|
|000003e0| 72 69 61 62 6c 65 20 6f | 75 74 70 75 74 20 66 69 |riable o|utput fi|
|000003f0| 65 6c 64 20 77 69 64 74 | 68 3f 0a 3e 20 53 61 79 |eld widt|h?.> Say|
|00000400| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 49 |, for ex|ample, I|
|00000410| 20 77 69 73 68 20 74 6f | 20 68 61 76 65 20 61 20 | wish to| have a |
|00000420| 77 69 64 74 68 20 6f 66 | 20 76 2b 33 2c 20 77 68 |width of| v+3, wh|
|00000430| 65 72 65 20 76 20 69 73 | 20 73 6f 6d 65 0a 3e 20 |ere v is| some.> |
|00000440| 69 6e 74 65 67 65 72 2c | 20 74 68 65 20 72 65 73 |integer,| the res|
|00000450| 75 6c 74 20 6f 66 20 73 | 6f 6d 65 20 63 61 6c 63 |ult of s|ome calc|
|00000460| 75 6c 61 74 69 6f 6e 2e | 20 49 73 20 74 68 65 72 |ulation.| Is ther|
|00000470| 65 20 73 6f 6d 65 20 77 | 61 79 20 74 6f 20 73 61 |e some w|ay to sa|
|00000480| 79 0a 3e 20 73 6f 6d 65 | 74 68 69 6e 67 20 6c 69 |y.> some|thing li|
|00000490| 6b 65 0a 3e 20 0a 3e 20 | 20 20 20 20 20 20 70 72 |ke.> .> | pr|
|000004a0| 69 6e 74 66 28 22 25 3c | 76 2b 33 3e 2e 3c 76 3e |intf("%<|v+3>.<v>|
|000004b0| 66 22 2c 20 66 6c 6f 61 | 74 69 6e 67 6e 75 6d 29 |f", floa|tingnum)|
|000004c0| 3b 0a 3e 20 0a 3e 20 77 | 68 65 72 65 20 74 68 65 |;.> .> w|here the|
|000004d0| 20 72 65 73 75 6c 74 20 | 6f 66 20 74 68 65 20 65 | result |of the e|
|000004e0| 76 61 6c 75 61 74 69 6f | 6e 20 6f 66 20 76 2b 33 |valuatio|n of v+3|
|000004f0| 20 61 6e 64 20 6f 66 20 | 76 20 77 69 6c 6c 20 62 | and of |v will b|
|00000500| 65 0a 3e 20 66 65 64 20 | 74 6f 20 70 72 69 6e 74 |e.> fed |to print|
|00000510| 66 3f 0a 3e 20 0a 3e 20 | 47 75 79 20 42 65 72 6c |f?.> .> |Guy Berl|
|00000520| 69 6e 65 72 0a 3e 20 2d | 2d 0a 3e 20 46 69 6e 67 |iner.> -|-.> Fing|
|00000530| 65 72 20 62 65 72 6c 69 | 6e 65 72 40 6e 65 74 63 |er berli|ner@netc|
|00000540| 6f 6d 31 38 2e 6e 65 74 | 63 6f 6d 2e 63 6f 6d 20 |om18.net|com.com |
|00000550| 66 6f 72 20 70 67 70 20 | 6b 65 79 2e 0a 0a 2d 2d |for pgp |key...--|
|00000560| 20 0a 20 20 20 20 5f 5f | 5f 20 20 20 20 20 20 20 | . __|_ |
|00000570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00000580| 61 69 6c 74 6f 3a 6d 61 | 78 2d 6c 74 6f 6e 40 74 |ailto:ma|x-lton@t|
|00000590| 63 70 2e 63 6f 2e 75 6b | 20 0a 20 20 2f 20 20 2f |cp.co.uk| . / /|
|000005a0| 20 20 2f 20 20 5f 20 20 | 20 20 20 20 20 2f 20 20 | / _ | / |
|000005b0| 20 20 20 2f 20 20 5f 20 | 20 5f 5f 20 5f 5f 20 20 | / _ | __ __ |
|000005c0| 20 5f 20 20 20 5f 5f 20 | 20 20 5f 0a 20 2f 20 20 | _ __ | _. / |
|000005d0| 2f 20 20 2f 20 2f 5f 2f | 20 7c 2f 20 20 2f 20 20 |/ / /_/| |/ / |
|000005e0| 2f 20 20 2f 20 2f 5f 2f | 20 20 2f 20 20 2f 5f 20 |/ / /_/| / /_ |
|000005f0| 20 20 2f 5f 2f 20 2f 20 | 2f 20 2f 20 2f 5f 2f 20 | /_/ / |/ / /_/ |
|00000600| 2f 7c 20 2f 0a 2f 20 20 | 2f 20 20 2f 20 2f 20 20 |/| /./ |/ / / |
|00000610| 2f 20 2f 7c 20 20 2f 5f | 2f 5f 2f 20 2f 20 20 2f |/ /| /_|/_/ / /|
|00000620| 20 20 2f 20 20 2f 5f 20 | 20 2f 20 20 7c 20 20 2f | / /_ | / | /|
|00000630| 20 2f 20 2f 20 2f 20 20 | 2f 20 2f 20 7c 2f 0a | / / / |/ / |/. |
+--------+-------------------------+-------------------------+--------+--------+